package ai.people.netmon.framework.enums.msg;

/**
 * 数据类型与检索库映射枚举
 */
public enum SourceAndEsIndexMapperEnum {
    //whatsapp, telegram, tor, instagram, facebook, twitter, youtube, ethereum, weibo, news, i2p
    i2p("data-darknet-i2p", "i2p检索库"),
    tor("data-darknet-tor", "tor检索库"),
    zeronet("data-darknet-zeronet", "zeronet检索库"),
    whatsapp("data-im-whatsapp", "whatsapp检索库"),
    news("data-web-news", "news检索库"),
    facebook("data-social-facebook", "facebook检索库"),
    //instagram("data-social-instagram", "instagram检索库"),//todo
    twitter("data-social-twitter", "twitter检索库"),
    weibo("data-social-weibo", "weibo检索库"),
    youtube("data-social-youtube", "youtube检索库"),
    telegram("data-im-telegram-*", "telegram检索库"),
    ethereum("data-social-ethereum", "ethereum检索库"),
    reddit("data-social-reddit", "reddit检索库"),
    gettr("data-social-gettr", "gettr检索库"),
    signal("data-social-signal", "signal检索库"),
    line("data-im-line", "line检索库");
    //whatsapp, telegram, tor, instagram, facebook, twitter, youtube, ethereum
    // 检索库名称
    private final String index;

    SourceAndEsIndexMapperEnum(String index, String msg) {
        this.index = index;
    }

    // 获取检索库
    public String getIndex() {
        return index;
    }

    // 根据source获取枚举对象
    public static SourceAndEsIndexMapperEnum fromSource(String name) {
        return SourceAndEsIndexMapperEnum.valueOf(name);
    }
}
